<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\admin\controller;

/**
 * 论坛内部人员控制器
 */
class BbsUser extends AdminBase
{

   
    
    /**
     * 论坛内部人员列表
     */
    public function memberList()
    {

        
        $this->assign('list', $this->logicBbsUser->getMemberList($this->param,'a.*','a.create_time desc,a.id desc',50));
        
        return $this->fetch('member_list');
    }



    /**
     * 论坛内部人员导出
     */
    public function exportMemberList()
    {
        
       // $where = $this->logicBbsUser->getWhere($this->param);
        
        $this->logicBbsUser->exportMemberList($this->param);
    }
    
    /**
     * 论坛内部人员添加
     */
    public function memberAdd()
    {
        
        IS_POST && $this->jump($this->logicBbsUser->memberAdd($this->param));
        return $this->fetch('member_add');
    }
    
    /**
     * 论坛内部人员编辑
     */
    public function memberEdit()
    {
        
        IS_POST && $this->jump($this->logicBbsUser->memberEdit($this->param));
        
        $info = $this->logicBbsUser->getMemberInfo(['id' => $this->param['id']]);
        
        $this->assign('info', $info);
        
        return $this->fetch('member_add');
    }
    
    /**
     * 论坛内部人员删除
     */
    public function memberDel($id = 0)
    {
        
        return $this->jump($this->logicBbsUser->memberDel(['id' => $id]));
    }
    
    /**
     * 修改密码
     */
    public function editPassword()
    {
        
        IS_POST && $this->jump($this->logicBbsUser->editPassword($this->param));
        
        $info = $this->logicBbsUser->getMemberInfo(['id' => MEMBER_ID]);
        
        $this->assign('info', $info);
        
        return $this->fetch('edit_password');
    }

    /**
     * 数据状态设置
     */
    public function update_info()
    {

        $this->jump($this->logicBbsUser->update_info( $this->param));
    }




}
